﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace Battleship
{
    class Utils
    {
        public static double[] readColumnToArray(DataTable table, string columnName)
        {
            return table.AsEnumerable().Select(r => r.Field<double>(columnName)).ToArray();
        }

        public static void copyArray(double[] sourceArray, double[] desArray)
        {
            for (int i = 0; i < desArray.Length; i++)
            {
                desArray[i] = sourceArray[i];
            }
        }
    }
}
